/**
 * 
 */
package org.linkminder.api;

/**
 * @author jackpark
 *
 */
public interface ILinkMinderSchema {

	/**
	 * <p>This Schema is based on the idea that any <em>idea</em>, defined as
	 * either a single word or a phrase (limited to 255 characters), can be associated
	 * with any other <em>idea</em>--indeed, can be associated with a list of them.</p>
	 * <p>The association is bi-directional: if a --> b, then b-->a</p>
	 * <p>When used with Derby, "drop if exists" is not valid.
	 * User must delete the tables first; Derby doesn't close with a ";"</p>
	 */
	public static final String [] IDEA_SCHEMA = { 
       "create table IDEAS ("+
        	"idea varchar(255) not null,"+
        	"associatedIdea varchar(255) not null)",
        	"create index MyFilePathIndex on IDEAS(idea)",
     };

	public static final String listAssociatedIdeas =
		"select associatedIdea from IDEAS where idea=?";
	public static final String insertAssociatedIdea =
		"insert into IDEAS (idea, associatedIdea) values(?, ?)";
}
